form {
	display: block;
}

input,
button,
select,
textarea {
	outline: none;
}

textarea {
	resize: none;
	border: none;
	background: none;
}

input {
	-webkit-appearance: textfield;
	background: none;
	-webkit-rtl-ordering: logical;
	user-select: text;
	cursor: auto;
	padding: 0;
	border: 0;
	font-size: 15px;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

input[type='checkbox'],
input[type='radio'] {
	box-sizing: border-box;
	-webkit-appearance: none; /*去除默认样式*/
	visibility: hidden;
	cursor: pointer;
	border: none;
	outline: none;
	background: transparent;
	position: relative;
	.flex-all-center;
	width: 32px;
	height: 100%;
	&:after {
		display: block;
		width: 16px;
		height: 16px;
		content: ' ';
		visibility: visible;
		.flex-all-center;
		background: url('../../image/form/checkbox/unchecked.svg') no-repeat center center;
		background-size: 100% 100%;
	}

	&:checked {
		&:after {
			//content: "✓";
			background-image: url('../../image/form/checkbox/checked.svg');
		}
	}

	&.radio {
		&:after {
			background: none;
		}

		&:checked {
			&:after {
				background-image: none;
			}
		}
	}
}

select {
	background: none;
	border: none;
	cursor: auto;
	font-size: 15px;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

// 红色星号
.required-star {
	&:after {
		content: ' ';
		display: inline-block;
		width: 10px;
		height: 10px;
		background: url('../../image/form/required-star.svg') no-repeat center;
		background-size: 60%;
	}
}
label {
	&.required {
		.required-star;
	}
}

.ignoreRequired {
	label {
		&.required {
			&:after {
				display: none;
			}
		}
	}
}

.input-range {
	input[type='date'],
	input[type='number'],
	input[type='text'],
	select {
		display: inline-block;
		width: 120px;
		font-size: 13px;
		.box-line;
	}

	.limit {
		display: inline-block;
		color: #aaa;
		padding: 0 2px;
	}
}

.form-item {
	.input {
		width: 100%;
		line-height: 24px;
		height: 24px;
	}

	.select {
		width: 100%;
		border: 0;
		line-height: 24px;
		height: 24px;
	}

	.textarea {
		width: 100%;
	}

	.icon-pending {
		color: #f46138;
	}

	.icon-pass {
		color: #2ac69e;
	}

	.icon-not_pass,
	.icon-expired {
		color: #f46138;
	}
}

.pageFormContent {
	position: relative;

	.legend {
		.flex-item;
		.padding-h;
		align-items: center;
		line-height: 40px;
		background: @defaultBg;
		color: @infoColor;
	}
	.form-item {
		background: #fff;
		position: relative;
		.flex-wrap-v;
		.t-line;
		padding: 10px;

		&.mini {
			min-height: 36px;
		}
		&:last-of-type {
			.tb-line;
		}
		input {
			.flex-item;
			padding: 2px 5px;

			&.inline-right {
				width: 40px;
				text-align: right;
				.box-line;
			}
		}

		label {
			color: #777;
			font-size: 15px;
			line-height: 24px;
		}

		.item-content {
			.flex-wrap;
			.align-center;
			.flex-item;
			font-size: 15px;

			label {
				width: 90px;
			}

			a,
			span {
				white-space: nowrap;
				color: @linkColor;
			}
		}

		&.disabled {
			color: #999;
		}

		&.dwz-user-icon {
			.item-content {
				justify-content: flex-end;

				img {
					max-width: 66px;
					max-height: 66px;
					border-radius: 50%;
					margin: 5px 15px;
				}
			}
		}
	}

	&.no-line {
		.form-item {
			border: none;
			min-height: 40px;
		}
	}
}

input:invalid,
select:invalid,
textarea:invalid {
	background: url('../../image/icon/icon-invalid.svg') 100% center no-repeat;
}

textarea:read-only {
	border-color: #9eabb3 #d5dbdf #d5dbdf #9eabb3;
	background-color: #f6f6f6;
}

.button {
	.flex-all-center;
	padding: 0 10px;
	height: 40px;
	line-height: 40px;
	color: @btnTxtColor;
	border: none;
	background: @btnBg;
	font-size: @l2;
	border-radius: 8px;
	outline: none;
	position: relative;
	overflow: hidden;
	&.hover:after {
		content: ' ';
		.full-abs;
		background-color: @hoverBg;
	}
	// 电子签名按钮
	&.sign {
		border-radius: 5px;
		background: #f5f5f5;
		color: @infoColor;
		height: 72px;
		font-size: @l2;
		.flex-all-center;
		.flex-item;
	}
	&.primary {
		background: @btnBgActive;
		color: @btnTxtColorActive;
	}
	&.disabled {
		background: #ccc;
		color: @btnTxtColorActive;
	}
}

.button-bar,
.form-bar {
	.padding-h;
	.button {
		width: 100%;
		margin-top: 10px;
		&:last-child {
			margin-bottom: 10px;
		}
	}
}
.form-bar {
	.t-line;
	background: @paneBg;
}
.form-button-group {
	display: flex;
	.button {
		border-radius: 0;
		flex: 1;
		border-right: 1px solid @borderColor;
		&:last-child {
			border: none;
		}
	}
}
